#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @Time: 2022/12/27 17:01
# @Author: 周健
# @Email: 907614893@qq.com
# @File：work_page.py
from pages.base_page import BasePage
from appium.webdriver.common.mobileby import MobileBy as By

class WorkPage(BasePage):
    mlhg_locator = (By.XPATH,'//android.support.v7.widget.RecyclerView[@resource-id=\"com.gfeng.daydaycook:id/recyclerView\"]/android.widget.RelativeLayout[2]/android.widget.RelativeLayout[1]/android.widget.RelativeLayout[1]/android.widget.ImageView[1]')
    new_mlhg_locator = (By.XPATH,'//android.widget.TextView[@resource-id=\"com.gfeng.daydaycook:id/tv_seen_title\"]')

    def click_mlhg(self):
        self.driver.find_element(*self.mlhg_locator).click()
    # 获取麻辣火锅文本
    def get_mlhg_text(self):
        return self.driver.find_element(*self.new_mlhg_locator).text
